#include <bits/stdc++.h>

using namespace std;
const int N = 100005;
int a[N],n;
int minnp,cxzp;
int ans = 0;
struct statement
{
    bool living=1,usiable=1;
}v[N];
int findcxz(int minp)
{
    for(int i=minp+1;i<n;i++)
    {
        if(a[i]>a[minp])
            return i;
    }
    return -1;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d",&a[i]);
    sort(a,a+n);
    minnp = 0;
    cxzp = findcxz(minnp);
    if(cxzp==-1)
    {
        printf("%d",n);
        return 0;
    }
    while(cxzp!=-1&&cxzp<=n-1)
    {
        v[minnp].living = 0;
        v[minnp].usiable = 0;
        v[cxzp].usiable = 0;

        minnp++;
        cxzp = findcxz(minnp);
        while(v[cxzp].usiable==0)
            cxzp++;
    }
    for(int i=0;i<n;i++)
    {
        if(v[i].living==1)
            ans++;
    }
    printf("%d",ans);
    return 0;
}
